<%--
  Created by IntelliJ IDEA.
  User: Tian
  Date: 2024/3/11
  Time: 18:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="../js/vue.js"></script>
    <script src="../js/axios.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
    <div id="app">
        <el-table
                :data="emps"
                border
                style="width: 100%">
            <el-table-column
                    prop="empno"
                    label="编号"
                    width="80">
            </el-table-column>
            <el-table-column
                    prop="ename"
                    label="姓名"
                    width="100">
            </el-table-column>
            <el-table-column
                    prop="job"
                    label="工作">
            </el-table-column>
            <el-table-column
                    prop="mar"
                    label="上司">
            </el-table-column>
            <el-table-column
                    prop="hiredate"
                    label="入职日期">
            </el-table-column>
            <el-table-column
                    prop="sal"
                    label="工资">
            </el-table-column>
            <el-table-column
                    prop="comm"
                    label="提出">
            </el-table-column>
            <el-table-column
                    prop="dept.deptname"
                    label="部门">
            </el-table-column>
        </el-table>

    </div>
</body>
<script>
   let vm=new Vue({
       el:"#app",
       data:{
          emps:[]
       },
       methods:{
           loadEmps(){
               axios.get("/getEmps").then(res=>{
                   console.log(res)
               })
           }
       },
       created(){
          this.loadEmps()
       }
   })
</script>
</html>
